package informationsystem

class UserController {
	def index() {
	}

	def login={
		if(params.username=="admin" && params.password=="admin"){
			flash.message= "login success"
			session.user="admin"
		}
		else{
			flash.message ="login failed"
		}
		redirect(action:'index')
	}
	def logout={
		session.user=null
		flash.message ="Sucessfully logout"
		redirect(action:'index')
	}
}
